package com.gongyibao.gbase.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

@Configuration("RedisConfig")
public class JedisConfig {

    @Value("${redis.sentinel.nodes:127.0.0.1:26379}")
    public String host;

    @Value("${redis.sentinel.master:DefaultService}")
    public String serverName;

    @Value("${redis.password:}")
    public String password;

    @Value("${redis.db:0}")
    public Integer db;

    @Value("${redis.auto-init:true}")
    public Boolean autoInit;

    @Value("${redis.max-active:300}")
    public Integer maxActive;

    @Value("${redis.max-idle:50}")
    public Integer maxIDLE;

    @Value("${redis.max-wait:10000}")
    public Integer maxWait;

    @Value("${redis.timeout:3000}")
    public Integer timeout;

    @Value("${redis.lock-timeout:30000}")
    public Integer lockTimeout;

    @Value("${redis.lock-wait:10000}")
    public Integer lockWait;
}
